<!--
 * @Author: lucky
 * @Date: 2021-06-30 19:07:26
 * @LastEditors: [you name]
 * @LastEditTime: 2021-07-02 20:46:53
 * @Description: 
-->
<template>
  <div>
     <div class="head">
      <van-nav-bar
        title="实名认证"
        left-arrow
        @click-left="toReturn"
      />
    </div>
    <div class="comment">
      <van-cell-group>
        <van-cell title="手机号码" :value="userData.telephone" />
        <van-cell title="身份证号" :value="userData.idCard" />
        <van-cell title="银行卡号" :value="userData.bankCard" />
      </van-cell-group>
        <!-- <span>手机号:{{userData.telephone}}</span>
        <br>
        <span>身份证号:{{userData.idCard}}</span>
        <br>
        <span>银行卡号:{{userData.bankCard}}</span>
        <br> -->
        <h3>身份证正面照:</h3>
        <van-image
            width="100%"
            height="20rem"
            fit="contain"
            :src="userData.idcardPhotoPositive"
          />
        <h3>身份证反面照:</h3>
        <van-image
            width="100%"
            height="20rem"
            fit="contain"
            :src="userData.idcardPhotoNegative"
          />
        <h3>银行卡照:</h3>
        <van-image
            width="100%"
            height="20rem"
            fit="contain"
            :src="userData.bankCardPhoto"
          />
    </div>
  </div>
</template>

<script>
import {findUserDetailsById} from '@/api/userDetails'
import {getinfo} from "@/utils/auth"
export default {
  data() {
    return {
      userData:[],
    };
  },
  computed: {},
  methods: {
    toReturn(){
      this.$router.push({
        path:"/mine",
        id:this.userData.id
      });
    },
    //获取信息
    async queryData(){
      let res = await findUserDetailsById({
        id:getinfo(),
      })
      this.userData = res.data;
      console.log(this.userData);
    }
  },
  created() {
    this.queryData();
  },
  mounted() {}
};
</script>
<style scoped>
.comment{
  text-align: left;
}
.comment > span{
  display: inline-block;
}

</style>